home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17694 < prev    next >
Encoding:
Text File  |  1996-08-05  |  682 b   |  28 lines

  1. Newsgroups: comp.lang.c++
  2. Path: in2.uu.net!pgh!jak
  3. From: jak@pgh.nauticom.net (Jamshid)
  4. Subject: Re: Char to int??
  5. Message-ID: <DpzMrD.F8@pgh.nauticom.net>
  6. Date: Wed, 17 Apr 1996 03:52:24 GMT
  7. References: <4ai0ov$l88@nosy.bart.nl>
  8. Organization: Nauticom - Internet Access Provider
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Steven van den Berg (painless@bart.nl) wrote:
  12. : Can somebody please tell me how you can covert a char to an int. I
  13. : want to convert a char like "a" to the scancode of a and put that into
  14. : an int. 
  15.  
  16. Anotherway that can work, depending on what you need...try using
  17.  
  18.   char c[]="car";
  19.   int Crap;
  20.  
  21.   Crap=atoi(c);
  22. }
  23.  
  24. Don't ask me what library you need.
  25.  
  26. -Jamshid
  27.